///// <reference path="fKanban.js" />
fKanban.user = function () { }
fKanban.user.prototype = new fKanban();
fKanban.user.prototype.constructor = fKanban.user;
fKanban.user.prototype.supr = fKanban.prototype;

fKanban.user.prototype.getUser = function () {
    return {
        Username: $("#Username").val(),
        Password: $("#Password").val()
    }
}
fKanban.user.prototype.login = function (success, faliure) {
    log("this.getUser():" + this.getUser());
    $.ajax({
        type: "POST",
        url: website + "Online/Login",
        dataType: "json",
        data: this.getUser(),
        success: function (obj) {
            if (success) success(obj);
        },
        error: function (err) {
            if (faliure) faliure(err);
        }
    });
}
fKanban.user.prototype.logout = function (success) {
    $.ajax({
        type: "POST",
        url: website + "Online/Logout",
        dataType: "json",
        success: function (obj) {
            if (success) success(obj);
        }
    });
}